package com.zhentao.controller;


import com.zhentao.model.common.dtos.LoginDto;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.ApUserService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * @author TonySong
 * @date 2024/5/30 0030
 * @time 15:37
 */
@RestController
@RequestMapping("/api/v1/login")
@Api(value = "app端用户登录",tags = "app端用户登录")
public class HelloController {

    //@Autowired
    @Resource
    private ApUserService  apUserService;

    @GetMapping("/test")
    public String hello(){
        System.out.println("hello....");
        return "hello";
    }
    @PostMapping("/login_auth")
    @ApiOperation(value = "app端用户登录",notes = "app端用户登录")
    public ResponseResult login(@RequestBody LoginDto loginDto){
        return  this.apUserService.login(loginDto);
    }
}
